package com.zhongyu.hellocloudgradeconsumer.service;

import com.zhongyu.hellocloudgradeconsumer.hystrix.GradeServiceHystrix;
import com.zhongyu.pojo.Grade;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "hellocloud-grade-provider",fallback = GradeServiceHystrix.class)
public interface GradeServiceFeign {
    @RequestMapping(value = "/grade/getList")
    public List<Grade> getGrades();

    @RequestMapping(value = "/grade/getById")
    public Grade getGradeById(Integer id);
}
